<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="item of swiperList" :key="item.id">
        <img class="img-swiper" :src="item.imgUrl" />
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
    <img src="@/assets/swiper/2.jpg"/>
  </div>

</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true,
        autoplay: 3000,
        autoplayDisableOnInteraction: false
      },
      swiperList: [{
        id: '1',
        imgUrl: require('@/assets/swiper/1.jpg')
      },
      {
        id: '2',
        imgUrl: require('@/assets/swiper/2.jpg')
      },
      {
        id: '3',
        imgUrl: require('@/assets/swiper/3.jpg')
      }
      ]

    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper >>> .swiper-pagination-bullet
  .swiper-pagination-bullet
    background: #fff
  .wrapper
    overflow: hidden
    height: 0
    width: 100%
    padding-bottom: 38%
    background: #ccc
    .img-swiper
      width: 100%
</style>
